<?php


namespace app\admin\controller;
use think\Db;
use think\Request;
use think\Controller;
class Exproject extends ApiCommon
{
    public function ExprojectWrite()
    {
        $newsModel=model('Exproject');
        $param=$this->param;
        $data=$newsModel->WriteExproject($param);
        if(!$data)
        {
            return resultArray(['error'=>'添加数据失败']);
        }
        return resultArray(['data'=>'添加数据成功']);
    }   

    public function ExprojectList()
    {
        $newsModel=model('Exproject');
        $param=$this->param;
        $data=$newsModel->ListExproject($param);
        return resultArray(['data'=> $data]);
    }   
    public function ExprojectRevise()
    {
        $newsModel=model('Exproject');
        $param=$this->param;
        $data=$newsModel->ReviseExproject($param);
        if(!$data)
        {
            return resultArray(['error'=>'修改数据失败']);
        }
        return resultArray(['data'=>'修改数据成功']);
    }
     public function ExprojectDelete()
    {
        $newsModel=model('Exproject');
        $param=$this->param;
        $data=$newsModel->DeleteExproject($param);
        if(!$data)
        {
            return resultArray(['error'=>'删除数据失败']);
        }
        return resultArray(['data'=>'删除数据成功']);
    }
}